﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using BlueDot.Data.Core;

namespace ExampleConsole.Data.Mocks
{
    /// <summary>
    /// Mock DataStore for testing business logic
    /// </summary>
    public class MockDataProvider : IDataStoreProvider
    {

        #region IDataStoreProvider Members

        public string ConnectionString { get; set; }

        /// <summary>
        /// Executes the non query.
        /// </summary>
        /// <param name="command">The command.</param>
        public void ExecuteNonQuery(ICommand command)
        {
            throw new NotImplementedException();
        }

        public TextWriter Log { get; set; }


        /// <summary>
        /// Gets or sets a value indicating whether [log enabled].
        /// </summary>
        /// <value><c>true</c> if [log enabled]; otherwise, <c>false</c>.</value>
        public bool LogEnabled
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        /// <summary>
        /// Selects the specified entity query.
        /// </summary>
        /// <param name="entityQuery">The entity query.</param>
        /// <returns></returns>
        public IEnumerable Select(EntityQuery entityQuery)
        {
            return new List<IEntity>();
        }

        /// <summary>
        /// Selects the specified entity query.
        /// </summary>
        /// <typeparam name="TEntity">The type of the entity.</typeparam>
        /// <param name="entityQuery">The entity query.</param>
        /// <returns></returns>
        public IEnumerable<TEntity> Select<TEntity>(EntityQuery entityQuery) where TEntity : IEntity
        {
            throw new NotImplementedException();
        }

        public IEnumerable<IEntity> Save(IEnumerable<IEntity> enties)
        {
            Console.WriteLine("MockDataProvider.Save called");
            return enties;
        }

        public int? MaxRecordLimit { get; set; }

        #endregion
    }
}